function tringTextArea() {
	var textAreas = document.getElementsByTagName('textarea');
	var cont = textAreas.length;
	var i = 0;
	while (i < cont) {
		textAreas[i].value = textAreas[i].value.replace(/^\s+|\s+$/g, "");
		i++;
	}
}

function setCmd(value) {
	document.menu.cmd.value = value;
}